home *** CD-ROM | disk | FTP | other *** search
/ Amiga Game-Power / Amiga Game-Power.iso / anwendungen / gw print / structurebrowser_v1.3 / sources / sbitext.c < prev    next >
C/C++ Source or Header  |  1994-05-20  |  2KB  |  59 lines

  1. /*
  2.    Handles the Intuition IntuiText structure
  3. */
  4.  
  5. #include "header/sb.h"
  6.  
  7. extern int level;         /* recursion level */
  8.  
  9.  
  10. /*
  11.   PrIText
  12.  
  13.   Put up the data for an IntuiText structure
  14. */
  15.  
  16. PrIText (string, itext)
  17. char *string;
  18. struct IntuiText *itext;
  19. {
  20. static struct StructData structdata [] =
  21.   {
  22.      { "-FrontPen",     "UBYTE",               PRUBYTE,    BYTESIZE},
  23.      { "-BackPen",      "UBYTE",               PRUBYTE,    BYTESIZE},
  24.      { "-DrawMode",     "UBYTE",               PRUBYTE,    INTSIZE },
  25.      { "-LeftEdge",     "SHORT",               PRINT,      INTSIZE },
  26.      { "-TopEdge",      "SHORT",               PRINT,      INTSIZE },
  27.      { " ITextFont",    "struct TextAttr *",   PRPTR,      PTRSIZE },
  28.      { " IText",        "UBYTE *",             PRSTRING,   PTRSIZE },
  29.      { " NextText",     "struct IntuiText *",  PRPTR,      PTRSIZE }
  30.   };
  31. int i, sum;
  32. int choice = -1;
  33.  
  34.    level++;
  35.  
  36.    while (choice)
  37.    {
  38.       sum = SetOptionText(string, structdata, (APTR)itext, DATASIZE, 0);
  39.  
  40.       switch (choice = GetChoice(DATASIZE))
  41.       {
  42.          case 6:
  43.             if (itext->ITextFont)
  44.                PrTextAttr("The font attributes for this IntuiText",
  45.                   itext->ITextFont);
  46.             break;
  47.          case 7:
  48.             if (itext->IText)
  49.                PrString("The text for this IntuiText", itext->IText);
  50.             break;
  51.          case 8:
  52.             if (itext->NextText)
  53.                PrIText("The next IntuiText", itext->NextText);
  54.             break;
  55.       }
  56.    }
  57.    level--;
  58. }
  59.